From 382e2b0b34717913302fec41b72237cf4e28e228 Mon Sep 17 00:00:00 2001 From: Zheng Zhu Date: Fri, 24 Sep 2004 00:10:34 +0000 Subject: [PATCH] Setting default user option using the content language rather than the UI language --- includes/User.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/User.php b/includes/User.php index d2e76546ee..42aadbe4d4 100644 --- a/includes/User.php +++ b/includes/User.php @@ -131,7 +131,7 @@ class User { * if we have an available language object. */ function loadDefaults() { - global $wgLang, $wgIP; + global $wgContLang, $wgIP; global $wgNamespacesToBeSearchedDefault; $this->mId = $this->mNewtalk = 0; @@ -140,7 +140,7 @@ class User { $this->mPassword = $this->mNewpassword = ''; $this->mRights = array(); // Getting user defaults only if we have an available language - if(isset($wgLang)) { $this->loadDefaultFromLanguage(); } + if(isset($wgContLang)) { $this->loadDefaultFromLanguage(); } foreach ($wgNamespacesToBeSearchedDefault as $nsnum => $val) { $this->mOptions['searchNs'.$nsnum] = $val; @@ -817,7 +817,7 @@ class User { } function getPageRenderingHash() { - global $wgLang; + global $wgContLang; if( $this->mHash ){ return $this->mHash; } @@ -836,7 +836,7 @@ class User { // add in language variant option if there are multiple variants // supported by the language object - if(sizeof($wgLang->getVariants())>1) { + if(sizeof($wgContLang->getVariants())>1) { $confstr .= '!' . $this->getOption( 'variant' ); } -- 2.20.1